Error 1
=======

Cannot insert the value NULL into column 'ShoppingCartID', table 'IBuyAdventure.dbo.ShoppingCarts'; column does not allow nulls. INSERT fails. The statement has been terminated. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'ShoppingCartID', table 'IBuyAdventure.dbo.ShoppingCarts'; column does not allow nulls. INSERT fails. The statement has been terminated.

Source Error: 


Line 23:                      
Line 24:            if (Request.Params["ProductCode"] != null) {
Line 25:               cart.AddShoppingCartItem(GetCustomerID(),Request.Params["ProductCode"]);
Line 26:            }           
Line 27:                      
 

Source File: c:\inetpub\wwwroot\IBuyAdventure\ShoppingCart.aspx    Line: 25 

Stack Trace: 


[SqlException: Cannot insert the value NULL into column 'ShoppingCartID', table 'IBuyAdventure.dbo.ShoppingCarts'; column does not allow nulls. INSERT fails.
The statement has been terminated.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, TdsParserState state) +162
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, TdsParserState state) +37
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +678
   System.Data.SqlClient.TdsParser.Run(RunBehavior run, SqlCommand cmdHandler, SqlDataReader dataStream) +1500
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +512
   System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +188
   IBuyAdventure.CartDB.AddShoppingCartItem(String customerName, String productCode) +943
   ASP.ShoppingCart_aspx.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\IBuyAdventure\ShoppingCart.aspx:25
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +73
   System.Web.UI.Page.ProcessRequestMain() +394

 




Error 2
=======

Exception Details: System.NullReferenceException: Value null was found where an instance of an object was required.

Source Error: 


Line 28:         
Line 29:           // Migrate any temporary shopping cart items to logged-in username
Line 30:           cart.MigrateShoppingCartItems(Session["AnonUID"].ToString(), UserName.Text);
Line 31:           // Set Client Authentication Cookie
Line 32:           FormsAuthentication.RedirectFromLoginPage(UserName.Text, Persist.Checked); 
 

Source File: c:\inetpub\wwwroot\IBuyAdventure\login.aspx    Line: 30 

Stack Trace: 


[NullReferenceException: Value null was found where an instance of an object was required.]
   ASP.login_aspx.LoginBtn_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\IBuyAdventure\login.aspx:30
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain() +660

 
